from flask import Flask, Blueprint

from applications.view.blog.share import bp as share_bp
from applications.view.blog.article import bp as article_bp
from applications.view.blog.category import bp as category_bp
from applications.view.blog.tag import bp as tag_bp

# 创建blog
blog_bp = Blueprint('blog', __name__, url_prefix='/blog')


def register_blog_bps(app: Flask):
    # 在blog_bp下注册子蓝图
    blog_bp.register_blueprint(tag_bp)
    blog_bp.register_blueprint(category_bp)
    blog_bp.register_blueprint(article_bp)
    blog_bp.register_blueprint(share_bp)
    app.register_blueprint(blog_bp)
